/*
 * @Author: 颜锦忠
 * @Date: 2021-04-06 09:49:40
 */

import { VuexModule, Module, Mutation, Action, getModule } from 'vuex-module-decorators';

import store from '../index';

@Module({
  dynamic: true,
  namespaced: true,
  name: 'common',
  store,
})
class CommonStore extends VuexModule {
  public collapse = false;

  @Mutation
  private commitSetCollapse(collapse: boolean) {
    this.collapse = collapse;
  }

  @Action
  public actionGetCollapse(collapse: boolean) {
    this.commitSetCollapse(collapse);
  }
}
export default getModule(CommonStore);
